<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>Solr SearchComponent开发实战 - (power up)</title>
  <meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>

<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<meta name="theme-color" content="#f8f5ec" />
<meta name="msapplication-navbutton-color" content="#f8f5ec">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#f8f5ec">


<meta name="author" content="Kevin Jiang" /><meta name="description" content="先介绍一下Solr的SearchHandler，SearchHandler是用来处理查询请求的配置。一个SearchHandler里面包含了" /><meta name="keywords" content="KevinJiang, AI大模型, AI落地, 全栈工程师, Java, Spring Boot" />






<meta name="generator" content="Hugo 0.84.4 with theme even" />


<link rel="canonical" href="http://kevinjiang.info/post/searchengine/solr-searchcomponent%E5%BC%80%E5%8F%91%E5%AE%9E%E6%88%98/" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">



<link href="/sass/main.min.78f8f17bab244b9ee62ad16480c9584d5fc2db06ae20681d1ca225cefd80767c.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.css" integrity="sha256-7TyXnr2YU040zfSP+rEcz29ggW4j56/ujTPwjMzyqFY=" crossorigin="anonymous">


<meta property="og:title" content="Solr SearchComponent开发实战" />
<meta property="og:description" content="先介绍一下Solr的SearchHandler，SearchHandler是用来处理查询请求的配置。一个SearchHandler里面包含了" />
<meta property="og:type" content="article" />
<meta property="og:url" content="http://kevinjiang.info/post/searchengine/solr-searchcomponent%E5%BC%80%E5%8F%91%E5%AE%9E%E6%88%98/" /><meta property="article:section" content="post" />
<meta property="article:published_time" content="2019-03-01T20:18:54+00:00" />
<meta property="article:modified_time" content="2019-03-01T20:18:54+00:00" />

<meta itemprop="name" content="Solr SearchComponent开发实战">
<meta itemprop="description" content="先介绍一下Solr的SearchHandler，SearchHandler是用来处理查询请求的配置。一个SearchHandler里面包含了"><meta itemprop="datePublished" content="2019-03-01T20:18:54+00:00" />
<meta itemprop="dateModified" content="2019-03-01T20:18:54+00:00" />
<meta itemprop="wordCount" content="1658">
<meta itemprop="keywords" content="Solr," /><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Solr SearchComponent开发实战"/>
<meta name="twitter:description" content="先介绍一下Solr的SearchHandler，SearchHandler是用来处理查询请求的配置。一个SearchHandler里面包含了"/>

<!--[if lte IE 9]>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/classlist/1.1.20170427/classList.min.js"></script>
<![endif]-->

<!--[if lt IE 9]>
  <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
<![endif]-->

</head>
<body>
  <div id="mobile-navbar" class="mobile-navbar">
  <div class="mobile-header-logo">
    <a href="/" class="logo">(Power up)</a>
  </div>
  <div class="mobile-navbar-icon">
    <span></span>
    <span></span>
    <span></span>
  </div>
</div>
<nav id="mobile-menu" class="mobile-menu slideout-menu">
  <ul class="mobile-menu-list">
    <a href="/">
        <li class="mobile-menu-item">首页</li>
      </a><a href="/post/">
        <li class="mobile-menu-item">归档</li>
      </a><a href="/tags/">
        <li class="mobile-menu-item">标签</li>
      </a><a href="/categories/">
        <li class="mobile-menu-item">分类</li>
      </a><a href="/resume/">
        <li class="mobile-menu-item">简历</li>
      </a>
  </ul>

  


</nav>

  <div class="container" id="mobile-panel">
    <header id="header" class="header">
        <div class="logo-wrapper">
  <a href="/" class="logo">(Power up)</a>
</div>





<nav class="site-navbar">
  <ul id="menu" class="menu">
    <li class="menu-item">
        <a class="menu-item-link" href="/">首页</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/post/">归档</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/tags/">标签</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/categories/">分类</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/resume/">简历</a>
      </li>
  </ul>
</nav>

    </header>

    <main id="main" class="main">
      <div class="content-wrapper">
        <div id="content" class="content">
          <article class="post">
    
    <header class="post-header">
      <h1 class="post-title">Solr SearchComponent开发实战</h1>

      <div class="post-meta">
        <span class="post-time"> 2019-03-01 </span>
        
          <span class="more-meta"> 约 1658 字 </span>
          <span class="more-meta"> 预计阅读 4 分钟 </span>
        
      </div>
    </header>

    <div class="post-toc" id="post-toc">
  <h2 class="post-toc-title">文章目录</h2>
  <div class="post-toc-content always-active">
    <nav id="TableOfContents">
  <ul>
    <li><a href="#配置">配置</a></li>
    <li><a href="#代码实现">代码实现</a>
      <ul>
        <li><a href="#继承">继承</a></li>
        <li><a href="#最后">最后</a></li>
      </ul>
    </li>
  </ul>
</nav>
  </div>
</div>
    <div class="post-content">
      <p>先介绍一下Solr的<code>SearchHandler</code>，<code>SearchHandler</code>是用来处理查询请求的配置。一个SearchHandler里面包含了若干个<code>SearchComponent</code>，实际的逻辑处理就在SearchComponent里面进行处理，还可以自行开发符合自己业务逻辑的SearchComponent，然后经过配置可以灵活的组合各种SearchComponent。各个SearchComponent就像流水线一样处理请求，各自负责自己的逻辑处理。</p>
<!-- raw HTML omitted -->
<p>基于Solr 7.5.0测试</p>
<h2 id="配置">配置</h2>
<p>最常使用的<code>/select</code>查询，使用的就是下面默认的配置：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-xml" data-lang="xml"><span class="nt">&lt;requestHandler</span> <span class="na">name=</span><span class="s">&#34;/select&#34;</span> <span class="na">class=</span><span class="s">&#34;solr.SearchHandler&#34;</span><span class="nt">&gt;</span>
  <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&#34;defaults&#34;</span><span class="nt">&gt;</span>
    <span class="nt">&lt;str</span> <span class="na">name=</span><span class="s">&#34;echoParams&#34;</span><span class="nt">&gt;</span>explicit<span class="nt">&lt;/str&gt;</span>
    <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&#34;rows&#34;</span><span class="nt">&gt;</span>10<span class="nt">&lt;/int&gt;</span>
  <span class="nt">&lt;/lst&gt;</span>
<span class="nt">&lt;/requestHandler&gt;</span>
</code></pre></td></tr></table>
</div>
</div><p>里面配置的defaults可以参考<a href="https://lucene.apache.org/solr/guide/7_6/requesthandlers-and-searchcomponents-in-solrconfig.html#default-components">官方文档</a></p>
<p>除了最常使用的默认搜索配置之外，这个<code>/select</code>配置还支持<code>First-components</code>和<code>Last-componets</code>的配置，也就是说在defaults的前面或者后面可以添加一些SearchComponent。具体的流程可以参考下面的图：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-fallback" data-lang="fallback">                           defaults
                         +-----------+
                         | query     |
+------------------+     | facet     |     +-----------------+
| First-Components | --&gt; | mlt       | --&gt; | Last-Components |
+------------------+     | highlight |     +-----------------+
                         | ......    |
                         +-----------+
</code></pre></td></tr></table>
</div>
</div><p>如果添加了First-Components和Last-Components之后，完整的配置看起来就是下面的样子：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-xml" data-lang="xml"><span class="nt">&lt;requestHandler</span> <span class="na">name=</span><span class="s">&#34;/select&#34;</span> <span class="na">class=</span><span class="s">&#34;solr.SearchHandler&#34;</span><span class="nt">&gt;</span>
  <span class="nt">&lt;arr</span> <span class="na">name=</span><span class="s">&#34;first-components&#34;</span><span class="nt">&gt;</span>
    <span class="nt">&lt;str&gt;</span>mycomponent1<span class="nt">&lt;/str&gt;</span>
    <span class="nt">&lt;str&gt;</span>mycomponent2<span class="nt">&lt;/str&gt;</span>
  <span class="nt">&lt;/arr&gt;</span>
  <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&#34;defaults&#34;</span><span class="nt">&gt;</span>
    <span class="nt">&lt;str</span> <span class="na">name=</span><span class="s">&#34;echoParams&#34;</span><span class="nt">&gt;</span>explicit<span class="nt">&lt;/str&gt;</span>
    <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&#34;rows&#34;</span><span class="nt">&gt;</span>10<span class="nt">&lt;/int&gt;</span>
  <span class="nt">&lt;/lst&gt;</span>
  <span class="nt">&lt;arr</span> <span class="na">name=</span><span class="s">&#34;last-components&#34;</span><span class="nt">&gt;</span>
    <span class="nt">&lt;str&gt;</span>spellcheck<span class="nt">&lt;/str&gt;</span>
    <span class="nt">&lt;str&gt;</span>mycomponent3<span class="nt">&lt;/str&gt;</span>
  <span class="nt">&lt;/arr&gt;</span>
<span class="nt">&lt;/requestHandler&gt;</span>
</code></pre></td></tr></table>
</div>
</div><p>还可以完全自定义整个查询的handler的流程，不使用默认的的SearchComponent：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span><span class="lnt">9
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-xml" data-lang="xml"><span class="nt">&lt;requestHandler</span> <span class="na">name=</span><span class="s">&#34;/select_2&#34;</span> <span class="na">class=</span><span class="s">&#34;solr.SearchHandler&#34;</span><span class="nt">&gt;</span>
  <span class="nt">&lt;arr</span> <span class="na">name=</span><span class="s">&#34;components&#34;</span><span class="nt">&gt;</span>
    <span class="nt">&lt;str&gt;</span>mycomponent1<span class="nt">&lt;/str&gt;</span>
    <span class="nt">&lt;str&gt;</span>query<span class="nt">&lt;/str&gt;</span>
    <span class="nt">&lt;str&gt;</span>mycomponent2<span class="nt">&lt;/str&gt;</span>
    <span class="nt">&lt;str&gt;</span>debug<span class="nt">&lt;/str&gt;</span>
    <span class="nt">&lt;str&gt;</span>mycomponent3<span class="nt">&lt;/str&gt;</span>
  <span class="nt">&lt;/arr&gt;</span>
<span class="nt">&lt;/requestHandler&gt;</span>
</code></pre></td></tr></table>
</div>
</div><p>可以结合自己实现的SearchComponents以及官方提供的一起来实现一个符合自己业务逻辑的查询请求。</p>
<h2 id="代码实现">代码实现</h2>
<p>先上代码，看一下一个TestComponent的实现最基本的方法需要实现哪些：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-java" data-lang="java"><span class="kn">package</span> <span class="nn">test.solr.components</span><span class="o">;</span>
<span class="kn">import</span> <span class="nn">java.io.IOException</span><span class="o">;</span>
<span class="kn">import</span> <span class="nn">org.apache.solr.handler.component.ResponseBuilder</span><span class="o">;</span>
<span class="kn">import</span> <span class="nn">org.apache.solr.handler.component.SearchComponent</span><span class="o">;</span>
<span class="kd">public</span> <span class="kd">class</span> <span class="nc">TestComponent</span> <span class="kd">extends</span> <span class="n">SearchComponent</span> <span class="o">{</span>  <span class="c1">// 1
</span><span class="c1"></span>    <span class="nd">@Override</span>
    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">prepare</span><span class="o">(</span><span class="n">ResponseBuilder</span> <span class="n">rb</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">IOException</span> <span class="o">{}</span>  <span class="c1">// 2
</span><span class="c1"></span>    <span class="nd">@Override</span>
    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">process</span><span class="o">(</span><span class="n">ResponseBuilder</span> <span class="n">rb</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">IOException</span> <span class="o">{}</span>  <span class="c1">// 3
</span><span class="c1"></span>    <span class="nd">@Override</span>
    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">finishStage</span><span class="o">(</span><span class="n">ResponseBuilder</span> <span class="n">rb</span><span class="o">)</span> <span class="o">{</span>  <span class="c1">// 4
</span><span class="c1"></span>      <span class="kd">super</span><span class="o">.</span><span class="na">finishStage</span><span class="o">(</span><span class="n">rb</span><span class="o">);</span>
    <span class="o">}</span>
    <span class="nd">@Override</span>
    <span class="kd">public</span> <span class="n">String</span> <span class="nf">getDescription</span><span class="o">()</span> <span class="o">{</span>
      <span class="k">return</span> <span class="kc">null</span><span class="o">;</span>
    <span class="o">}</span>
<span class="o">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="继承">继承</h3>
<p>首先需要继承Solr的<code>SearchComponent</code>类(1)，最少需要实现<code>prepare</code>和<code>process</code>两个方法(2和3)，finishStage方法有默认的实现，如果没有需要可以不重写该方法。</p>
<p>在SearchHandler类里面有处理components的整个流程，一共有5个阶段：</p>
<ol>
<li>ResponseBuilder.STAGE_START</li>
<li>ResponseBuilder.STAGE_PARSE_QUERY</li>
<li>ResponseBuilder.STAGE_EXECUTE_QUERY</li>
<li>ResponseBuilder.STAGE_GET_FIELDS</li>
<li>ResponseBuilder.STAGE_DONE</li>
</ol>
<p>在SearchHandler与SearchComponent的执行的过程中，需要注意区分是不是分布式的执行方式。像SolrCore或者一个Shard的情况下就不是分布式；还有在请求从master分发到每个shard的时候，也不是分布式了。</p>
<h4 id="prepare方法">prepare方法</h4>
<p>首先执行的是prepare方法。</p>
<p>prepare方法在请求到达的机器那个节点会执行一次，然后在每个实际处理的shard上会再执行一次，假如一个collection有两个shard，那么prepare会被执行三次。可以通过<code>rb.isDistributed()</code>方法判断是第一次，还是在shard上面执行的。</p>
<h4 id="process方法">process方法</h4>
<p>然后就是执行process方法，这个方法是在shard上面执行的，所有跟索引数据相关的操作（查询，高亮等等）都可以放到在这个方法里面进行处理。</p>
<h4 id="finishstage方法">finishStage方法</h4>
<p>上面提到了components的5个阶段，每个阶段都会调用这个finishStage方法，第5个方法ResponseBuilder.STAGE_DONE是不会调用到finishStage方法的，所以最后一个方法被调用的阶段是ResponseBuilder.STAGE_GET_FIELDS，如果有需要合并的数据需要判断一下是不是在这个阶段。</p>
<h3 id="最后">最后</h3>
<p>展示一下最后的示例代码，在返回的结果没有添加一个字段：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">CheckComponent</span> <span class="kd">extends</span> <span class="n">SearchComponent</span> <span class="o">{</span>
    <span class="nd">@Override</span>
    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">prepare</span><span class="o">(</span><span class="n">ResponseBuilder</span> <span class="n">responseBuilder</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">IOException</span> <span class="o">{}</span>
    <span class="nd">@Override</span>
    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">process</span><span class="o">(</span><span class="n">ResponseBuilder</span> <span class="n">responseBuilder</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">IOException</span> <span class="o">{}</span>
    <span class="nd">@Override</span>
    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">finishStage</span><span class="o">(</span><span class="n">ResponseBuilder</span> <span class="n">rb</span><span class="o">)</span> <span class="o">{</span>
        <span class="k">if</span> <span class="o">(</span><span class="n">rb</span><span class="o">.</span><span class="na">stage</span> <span class="o">!=</span> <span class="n">ResponseBuilder</span><span class="o">.</span><span class="na">STAGE_GET_FIELDS</span><span class="o">)</span> <span class="k">return</span><span class="o">;</span>
        <span class="n">rb</span><span class="o">.</span><span class="na">rsp</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="s">&#34;check_info&#34;</span><span class="o">,</span> <span class="s">&#34;add by check component&#34;</span><span class="o">);</span>
    <span class="o">}</span>
    <span class="nd">@Override</span>
    <span class="kd">public</span> <span class="n">String</span> <span class="nf">getDescription</span><span class="o">()</span> <span class="o">{</span>
        <span class="k">return</span> <span class="kc">null</span><span class="o">;</span>
    <span class="o">}</span>
<span class="o">}</span>
</code></pre></td></tr></table>
</div>
</div><p>在finishStage方法里面，为rb.rsp这个返回的数据里面添加了一个<code>check_info</code>节点，内容为<code>add by check component</code></p>
<p>后续再丰富本文内容&hellip;&hellip;</p>

    </div>

    <div class="post-copyright">
  <p class="copyright-item">
    <span class="item-title">文章作者</span>
    <span class="item-content">Kevin Jiang</span>
  </p>
  <p class="copyright-item">
    <span class="item-title">上次更新</span>
    <span class="item-content">
        2019-03-01
        
    </span>
  </p>
  
  <p class="copyright-item">
    <span class="item-title">许可协议</span>
    <span class="item-content"><a rel="license noopener" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank">CC BY-NC-ND 4.0</a></span>
  </p>
</div>
<div class="post-reward">
  <input type="checkbox" name="reward" id="reward" hidden />
  <label class="reward-button" for="reward">赞赏支持</label>
  <div class="qr-code">
    
    <label class="qr-code-image" for="reward">
        <img class="image" src="/img/wechat_pay_1242x1242.jpg">
        <span>微信打赏</span>
      </label>
    <label class="qr-code-image" for="reward">
        <img class="image" src="/img/alipay_600x600.jpg">
        <span>支付宝打赏</span>
      </label>
  </div>
</div><footer class="post-footer">
      <div class="post-tags">
          <a href="/tags/solr/">Solr</a>
          </div>
      <nav class="post-nav">
        <a class="prev" href="/post/searchengine/solr%E6%95%99%E7%A8%8B-%E5%AE%89%E8%A3%85%E8%BF%90%E8%A1%8C/">
            <i class="iconfont icon-left"></i>
            <span class="prev-text nav-default">Solr教程-安装运行</span>
            <span class="prev-text nav-mobile">上一篇</span>
          </a>
        <a class="next" href="/post/%E4%BD%BF%E7%94%A8surprise%E5%AE%9E%E7%8E%B0%E7%94%B5%E5%BD%B1%E6%8E%A8%E8%8D%90/">
            <span class="next-text nav-default">使用Surprise实现电影推荐</span>
            <span class="next-text nav-mobile">下一篇</span>
            <i class="iconfont icon-right"></i>
          </a>
      </nav>
    </footer>
  </article>
        </div>
        

  

  

      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="social-links">
      <a href="mailto:wenlin1988@126.com" class="iconfont icon-email" title="email"></a>
      <a href="https://www.linkedin.com/in/%E6%96%87%E6%9E%97-%E8%92%8B-0a3204126/" class="iconfont icon-linkedin" title="linkedin"></a>
      <a href="https://github.com/kevindragon" class="iconfont icon-github" title="github"></a>
  <a href="http://kevinjiang.info/index.xml" type="application/rss+xml" class="iconfont icon-rss" title="rss"></a>
</div>

<div class="copyright">
  <span class="power-by">
    由 <a class="hexo-link" href="https://gohugo.io">Hugo</a> 强力驱动
  </span>
  <span class="division">|</span>
  <span class="theme-info">
    主题 -
    <a class="theme-link" href="https://github.com/olOwOlo/hugo-theme-even">Even</a>
  </span>

  

  <span class="copyright-year">
    &copy;
    2015 -
    2023<span class="heart"><i class="iconfont icon-heart"></i></span><span>Kevin Jiang</span>
    <a href="https://beian.miit.gov.cn/" target="_blank">湘ICP备2022022745号</a>
  </span>
</div>

    </footer>

    <div class="back-to-top" id="back-to-top">
      <i class="iconfont icon-up"></i>
    </div>
  </div>
  
  <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/slideout@1.0.1/dist/slideout.min.js" integrity="sha256-t+zJ/g8/KXIJMjSVQdnibt4dlaDxc9zXr/9oNPeWqdg=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.js" integrity="sha256-XVLffZaxoWfGUEbdzuLi7pwaUJv1cecsQJQqGLe7axY=" crossorigin="anonymous"></script>



<script type="text/javascript" src="/js/main.min.c99b103c33d1539acf3025e1913697534542c4a5aa5af0ccc20475ed2863603b.js"></script>
  <script type="text/javascript">
    window.MathJax = {
      tex: {
        inlineMath: [['$','$'], ['\\(','\\)']],
        tags: 'ams',
        }
    };
  </script>
  <script type="text/javascript" async src="/lib/mathjax/es5/tex-mml-chtml.js"></script>

<script id="baidu_analytics">
  var _hmt = _hmt || [];
  (function() {
    if (window.location.hostname === 'localhost') return;
    var hm = document.createElement("script"); hm.async = true;
    hm.src = "https://hm.baidu.com/hm.js?b73ff6d4afc4af9e582d8a5dc068bab9";
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);
  })();
</script>






</body>
</html>
